package cn.DesignModel.adapt;

import java.util.Enumeration;
import java.util.Iterator;
import java.util.Vector;

/**
 * @author: lizemin
 * @version: 1.0
 */
public class Demo {
    //这是一个main方法,是程序的入口
    public static void main(String[] args) {
        Vector vector = new Vector();
        vector.add("java");
        vector.add("python");
        vector.add("javaScript");
        Enumeration enumeration = vector.elements();

        Iterator iterator = new EnumerationAdapter(enumeration);
        while (iterator.hasNext()) {
            System.out.println(iterator.next());
        }

    }
}
